package com.platform.module.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.platform.common.annotation.Excel;
import com.platform.common.annotation.Excels;
import com.platform.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 集中器设备数据对象 base_concentrator_data
 * 
 * @author wangqi
 * @date 2020-07-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("base_concentrator_data")
public class BaseConcentratorData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 集中器ID */
    @NotBlank(message = "集中器ID不能为空")
    @Excel(name = "集中器ID")
    @TableId(type = IdType.INPUT)
    private String concentratorId;

    /** 型号id */
    @NotBlank(message = "型号id不能为空")
    @Excel(name = "型号id")
    private Long typeId;

    /** 安装时间 */
    @Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date installTime;

    /** 安装地址 */
    @Excel(name = "安装地址")
    private String installAddress;

    /** 安装位置 */
    @Excel(name = "安装位置")
    private String installPosition;

    /** 安装人 */
    @Excel(name = "安装人")
    private String installUser;


    /** Sim卡号 */
    @Excel(name = "Sim卡号")
    private String concentratorSim;

    /** 运营商 */
    @Excel(name = "运营商")
    private String concentratorYys;

    /** 资费到期 */
    @Excel(name = "资费到期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date concentratorZfdq;

    /** 资费说明 */
    @Excel(name = "资费说明")
    private String concentratorZfsm;

    /** 删除标识（0正常1删除） */
    private String delFlag;
    /** 厂商信息 */
    @Excels({
            @Excel(name = "厂商名称", targetAttr = "factoryName", type = Excel.Type.EXPORT),
            @Excel(name = "厂商代码", targetAttr = "factoryCode", type = Excel.Type.EXPORT)
    })
    @TableField(exist = false)
    private BaseFactory factory;

    @Excel(name = "集中器型号", type = Excel.Type.IMPORT)
    @TableField(exist = false)
    private String typeName;
    /** 集中器类型 */
    @Excels({
            @Excel(name = "集中器类型", targetAttr = "typeName", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private BaseConcentratorType concentratorType;

    /** 集中器id */
    @TableField(exist = false)
    private String concentratorIds;

    /** 阀门开度 */
    @TableField(exist = false)
    private Integer aperture;

    /** 心跳时间 */
    @TableField(exist = false)
    private Integer heart;

    /** 离线采集时间 */
    @TableField(exist = false)
    private Integer settime;

    /** 安装标识（0未登记1已登记2已注销) */
    @TableField(exist = false)
    private String status;

    @TableField(exist = false)
    private String serverip;

    @TableField(exist = false)
    private Integer serverport;

    @TableField(exist = false)
    private BaseSubscriber subscriber;
    /** 地址id */
    @TableField(exist = false)
    private String subscriberId;
    /** 热表id */
    @TableField(exist = false)
    private String calorimeterId;
    /** 室温采集器id */
    @TableField(exist = false)
    private String brtId;
    /** 阀门id */
    @TableField(exist = false)
    private String valveId;

    @TableField(exist = false)
    private Integer count;

}
